package de.kardass.jannobatch.examples.simple;

import de.kardass.jannobatch.annotation.Batch;
import de.kardass.jannobatch.annotation.BatchException;
import de.kardass.jannobatch.annotation.BatchJob;
import de.kardass.jannobatch.annotation.BatchStep;
import de.kardass.jannobatch.examples.simple.second.SecondModule;

@Batch(id="The-Batch",
	jobs= {
		@BatchJob(id = "FirstJob", 
				reader = SimpleDataReader.class, 
				steps = { 
					@BatchStep(id = "Step1", module = SimpleModule.class),
					@BatchStep(id = "Step2", module = SecondModule.class)
				}, 
				writer = SimpleDataConsumer.class,
				exceptions = {
					@BatchException(exception=Exception.class, handler=SimpleErrorHandler.class)
				}),
		@BatchJob(id = "SecondJob", 
				reader = SimpleDataReader.class, 
				steps = { 
					@BatchStep(id = "Step1", module = SimpleModule.class),
					@BatchStep(id = "Step2", module = SecondModule.class)
				})
//		@BatchJob(id = "JobNoProcessor", 
//				reader = SimpleDataSupplier.class,
//				steps = { 
//					@BatchStep(id = "Step1", module = SimpleModule.class),
//					@BatchStep(id = "Step2", module = SecondModule.class),
//					@BatchStep(id = "Third1", module = ThirdStep1.class)
//				}),
//		@BatchJob(id = "ThirdJob", 
//				reader = ThirdReader.class, 
//				steps = { 
//					@BatchStep(id = "Third1", module = ThirdStep1.class),
//					@BatchStep(id = "Third2", module = ThirdStep2.class),
//					@BatchStep(id = "Third3SendEmail", module = ThirdStep3SendEmail.class)
//				},
//				writer=ThirdWriter.class),
				
	})
//@BatchJob(id = "SecondBatch", 
//		reader = SimpleDataSupplier.class, 
//		steps = { 
//			@BatchStep(id = "Step1", module = SimpleModule.class),
//			@BatchStep(id = "Step2", module = SecondModule.class)
//		})
public class SimpleBatch {

}
